<?php
if (YII_ENV == 'dev'){
    $_mysql_host = "";
    $_mysql_username = "";
    $_mysql_password = "";
}else{
    $_mysql_host = "";
    $_mysql_username = "";
    $_mysql_password = "";
}

$config = [
    'components' => [
        'db' => [
            'class' => 'yii\db\Connection',
            'dsn' => "mysql:host={$_mysql_host};dbname=credit_api",
            'username' => $_mysql_username,
            'password' => $_mysql_password,
            'charset' => 'utf8',
            // common configuration for slaves
            'slaveConfig' => [
                'username' => $_mysql_username,
                'password' => $_mysql_password,
                'attributes' => [
                    // use a smaller connection timeout
                    PDO::ATTR_TIMEOUT => 10,
                ],
            ],
            // list of slave configurations
            'slaves' => [
                ['dsn' => "mysql:host={$_mysql_host};dbname=credit_api"],
            ],
        ],
        'db_public' => [
            'class' => 'yii\db\Connection',
            'dsn' => "mysql:host={$_mysql_host};dbname=credit_public",
            'username' => $_mysql_username,
            'password' => $_mysql_password,
            'charset' => 'utf8',
        ],
        'db_app' => [
            'class' => 'yii\db\Connection',
            'dsn' => "mysql:host={$_mysql_host};dbname=credit_app",
            'username' => $_mysql_username,
            'password' => $_mysql_password,
            'charset' => 'utf8',
            'tablePrefix' => 'dyhl_',
        ],
        'db_old_app' => [
            'class' => 'yii\db\Connection',
            'dsn' => "mysql:host={$_mysql_host};dbname=credit_ysjr",
            'username' => $_mysql_username,
            'password' => $_mysql_password,
            'charset' => 'utf8',
            'tablePrefix' => 'sl_',
        ],
        'db_workin' => [
            'class' => 'yii\db\Connection',
            'dsn' => "mysql:host={$_mysql_host};dbname=credit_api",
            'username' => $_mysql_username,
            'password' => $_mysql_password,
            'charset' => 'utf8',
            'tablePrefix' => 'workin_',
        ],
        'db_online_verify' => [
            'class' => 'yii\db\Connection',
            'dsn' => "mysql:host=114.55.75.134;dbname=ris",
            'username' => 'root',
            'password' => '',
            'charset' => 'utf8',
            'tablePrefix' => 'workin_',
        ],
        'mailer' => [
            'class' => 'yii\swiftmailer\Mailer',
            'viewPath' => '@common/mail',
            // send all mails to a file by default. You have to set
            // 'useFileTransport' to false and configure a transport
            // for the mailer to send real emails.
            'useFileTransport' => true,
        ],
        'ftp_call_WC' => [
            'class' => 'creocoder\flysystem\FtpFilesystem',
            'host' => 'tianji.sunning.net',
            'port' => 21,
            'username' => 'user',
            'password' => '',
            // 'ssl' => true,
            // 'timeout' => 60,
            // 'root' => '/path/to/root',
            // 'permPrivate' => 0700,
            // 'permPublic' => 0744,
            // 'passive' => false,
            // 'transferMode' => FTP_TEXT,
        ],
        'ftp_call_HA' => [
            'class' => 'creocoder\flysystem\FtpFilesystem',
            'host' => '192.168.1.25',
            'port' => 21,
            'username' => 'user',
            'password' => '',
        ],
        'ftp_call_HB' => [
            'class' => 'creocoder\flysystem\FtpFilesystem',
            'host' => '192.168.1.24',
            'port' => 21,
            'username' => 'user',
            'password' => '',
        ],
        'sftp_local' => [
            'class' => 'creocoder\flysystem\SftpFilesystem',
            'host' => '127.0.0.1',
            'port' => 22,
            'username' => 'wodrow',
            'password' => '',
        ],
        'sftp_99_7' => [
            'class' => 'creocoder\flysystem\SftpFilesystem',
            'host' => '192.168.99.7',
            'port' => 22,
            'username' => 'ysjrapi',
            'password' => '',
        ],
        'sftp_ryx' => [
            'class' => 'creocoder\flysystem\SftpFilesystem',
            'host' => '113.106.85.45',
            'port' => 62222,
            'username' => 'ryxsftp',
            'password' => '',
            'root' => 'upload',
        ],
        'ftp_hjc' => [
            'class' => 'creocoder\flysystem\FtpFilesystem',
            'host' => '39.105.63.39',
            'port' => 21,
            'username' => 'ysxc',
            'password' => '',
        ],
        'sftp_hjc' => [
            'class' => 'creocoder\flysystem\SftpFilesystem',
//            'host' => '39.105.63.39',
            'host' => '39.105.87.192',
            'port' => 22,
//            'username' => 'ftpuser',
            'username' => 'sftpuser1',
            'password' => '',
        ],
        'umeng' => [
            'class' => \common\components\wodrow\umeng\MessageClient::className(),
            'app_key' => '',
            'app_master_secret' => '',
        ],
        'bairong0' => [ // 易商
            'class' => \common\components\big_data\BaiRong::className(),
            'api_user_account'=>"ysjrStr",
            'api_user_password'=>"ysjrStr",
            'api_user_api_code'=>"3002137",
            'api_login_url'=>"https://api.100credit.cn/bankServer2/user/login.action",
            'web_user_account'=>"ysjrStr",
//            'web_user_password'=>"ysjrStr123",
            'web_user_password'=>"zyx0211",
            'web_user_api_code'=>"3002137",
            'web_login_url'=>"https://apiservice.100credit.com/api/auth-service/auth/getToken",
            'need_strategys' => [
                \common\models\BaiRongValidateLog::STRATEGY_TYPE_DETAIL_LIST => "STR0000798",
                \common\models\BaiRongValidateLog::STRATEGY_TYPE_PERSON_RECOGNITION => "MCP0000098",
            ],
        ],
        'bairong1' => [ // 宝泽
            'class' => \common\components\big_data\BaiRong::className(),
            'api_user_account'=>"bzqcStr",
            'api_user_password'=>"bzqcStr",
            'api_user_api_code'=>"3002208",
            'api_login_url'=>"https://api.100credit.cn/bankServer2/user/login.action",
            'web_user_account'=>"bzqcStr",
//            'web_user_password'=>"K6Adw*",
            'web_user_password'=>"bz000000",
            'web_user_api_code'=>"3002208",
            'web_login_url'=>"https://apiservice.100credit.com/api/auth-service/auth/getToken",
            'need_strategys' => [
                \common\models\BaiRongValidateLog::STRATEGY_TYPE_DETAIL_LIST => "STR0000959",
                \common\models\BaiRongValidateLog::STRATEGY_TYPE_PERSON_RECOGNITION => "MCP0000167",
            ],
        ],
        'bairong2' => [ // 其他
            'class' => \common\components\big_data\BaiRong::className(),
            'api_user_account'=>"yishangStr",
            'api_user_password'=>"yishangStr",
            'api_user_api_code'=>"3002309",
            'api_login_url'=>"https://api.100credit.cn/bankServer2/user/login.action",
            'web_user_account'=>"yishangStr",
//            'web_user_password'=>"K6Adw*",
            'web_user_password'=>'8$ER!*',
            'web_user_api_code'=>"3002309",
            'web_login_url'=>"https://apiservice.100credit.com/api/auth-service/auth/getToken",
            'need_strategys' => [
                \common\models\BaiRongValidateLog::STRATEGY_TYPE_STR0022664 => "STR0022664",
                \common\models\BaiRongValidateLog::STRATEGY_TYPE_STR0022665 => "STR0022665",
                \common\models\BaiRongValidateLog::STRATEGY_TYPE_MCP0022667 => "MCP0022667",
                \common\models\BaiRongValidateLog::STRATEGY_TYPE_MCP0022668 => "MCP0022668",
            ],
        ],
    ],
];

return $config;